package com.appfahrt.persistence.obj.dbo.generated;

import java.util.ArrayList;
import com.appfahrt.persistence.obj.AbstractDatabaseObject;
import com.appfahrt.persistence.obj.dao.generated.AdresseGeneratedDao;


/**
 * This Class is automatically generated.<br><br>
 *
 * <u><b>${schema}.adresse</b></u><br><br>
 * 
 * <u><b>Table Definition:</b></u>
 * <table> 
 *   <tr> <th>Column-Name</th> <th>Data-Type</th> <th>Data-Length</th> <th>Nullable</th> <th>Description</th> </tr> 
 *   <tr> <td>ID </td> <td>INTEGER</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>plz </td> <td>integer</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>ort </td> <td>VARCHAR</td> <td>45</td> <td>false</td> <td>-</td> 
 *   <tr> <td>strasse </td> <td>VARCHAR</td> <td>45</td> <td>false</td> <td>-</td> 
 *   <tr> <td>hausnummer </td> <td>VARCHAR</td> <td>45</td> <td>false</td> <td>-</td> 
 *   <tr> <td>logitude </td> <td>float</td> <td>-1</td> <td>false</td> <td>-</td> 
 *   <tr> <td>latitude </td> <td>float</td> <td>-1</td> <td>false</td> <td>-</td> 
 * </table>
 * <br><br>
 * <u><b>References:</b></u> <br>
 *
 * <br><br>
 * <u><b>Indexes:</b></u> <br>
 *
 * <br><b>DON'T MODIFY THIS FILE</b><br><br>
 *
 * Generated: Sun May 22 22:20:17 CEST 2011
 */
public abstract class AdresseGeneratedDbo extends AbstractDatabaseObject {
	
	public static final String TABLE = "adresse";
	
	public static final String SCHEMA = "$schema";

	protected ArrayList<String> changedFieldList = new ArrayList<String>();
	
	private boolean loadFromDb = false;

	// Database Column-Definition
	public static final String id = "id"; 
	public static final String plz = "plz"; 
	public static final String ort = "ort"; 
	public static final String strasse = "strasse"; 
	public static final String hausnummer = "hausnummer"; 
	public static final String logitude = "logitude"; 
	public static final String latitude = "latitude"; 
	public final static String[] COLUMNS = {  id , plz , ort , strasse , hausnummer , logitude , latitude  };

	// Members
			private Long Id = null;
				private Long Plz = null;
				private String Ort = null;
				private String Strasse = null;
				private String Hausnummer = null;
				private Float Logitude = null;
				private Float Latitude = null;
	
	/** Value-Holder for the references **/
	private References references = new References();
	
	/**
	 * Value-Holder for the references.
	 */
	public class References {


	}

	/**
	 * Constructor.
	 */
	public AdresseGeneratedDbo() {
	
	}
	
	
	/**
	 * Returns the references.
	 */
	public References getReferences() {
		return this.references;
	}
	
	/**
	 * Setter for <b>ID</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setId(Long Id) {
				if (!(Id == null && this.Id == null) && !this.changedFieldList.contains("ID")) {
			this.changedFieldList.add("ID");
		}
		this.Id = Id ;
			}
	
	/**
	 * Getter for <b>ID</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getId () {
		return this.Id;
	}
	
	/**
	 * Equals-Method for <b>ID</b>  <br>
	 * Type: INTEGER <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsId(Long Id) {
		boolean result = false;
				if (getId () != null
			&& getId ().equals( Id )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>plz</b>  <br>
	 * Type: integer <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setPlz(Long Plz) {
				if (!(Plz == null && this.Plz == null) && !this.changedFieldList.contains("plz")) {
			this.changedFieldList.add("plz");
		}
		this.Plz = Plz ;
			}
	
	/**
	 * Getter for <b>plz</b>  <br>
	 * Type: integer <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Long getPlz () {
		return this.Plz;
	}
	
	/**
	 * Equals-Method for <b>plz</b>  <br>
	 * Type: integer <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsPlz(Long Plz) {
		boolean result = false;
				if (getPlz () != null
			&& getPlz ().equals( Plz )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>ort</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setOrt(String Ort) {
				if (!(Ort == null && this.Ort == null) && !this.changedFieldList.contains("ort")) {
			this.changedFieldList.add("ort");
		}
		this.Ort = Ort ;
			}
	
	/**
	 * Getter for <b>ort</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public String getOrt () {
		return this.Ort;
	}
	
	/**
	 * Equals-Method for <b>ort</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsOrt(String Ort) {
		boolean result = false;
				if (getOrt () != null
			&& getOrt ().equals( Ort )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>strasse</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setStrasse(String Strasse) {
				if (!(Strasse == null && this.Strasse == null) && !this.changedFieldList.contains("strasse")) {
			this.changedFieldList.add("strasse");
		}
		this.Strasse = Strasse ;
			}
	
	/**
	 * Getter for <b>strasse</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public String getStrasse () {
		return this.Strasse;
	}
	
	/**
	 * Equals-Method for <b>strasse</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsStrasse(String Strasse) {
		boolean result = false;
				if (getStrasse () != null
			&& getStrasse ().equals( Strasse )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>hausnummer</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setHausnummer(String Hausnummer) {
				if (!(Hausnummer == null && this.Hausnummer == null) && !this.changedFieldList.contains("hausnummer")) {
			this.changedFieldList.add("hausnummer");
		}
		this.Hausnummer = Hausnummer ;
			}
	
	/**
	 * Getter for <b>hausnummer</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public String getHausnummer () {
		return this.Hausnummer;
	}
	
	/**
	 * Equals-Method for <b>hausnummer</b>  <br>
	 * Type: VARCHAR <br>
	 * Length: 45 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsHausnummer(String Hausnummer) {
		boolean result = false;
				if (getHausnummer () != null
			&& getHausnummer ().equals( Hausnummer )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>logitude</b>  <br>
	 * Type: float <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setLogitude(Float Logitude) {
				if (!(Logitude == null && this.Logitude == null) && !this.changedFieldList.contains("logitude")) {
			this.changedFieldList.add("logitude");
		}
		this.Logitude = Logitude ;
			}
	
	/**
	 * Getter for <b>logitude</b>  <br>
	 * Type: float <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Float getLogitude () {
		return this.Logitude;
	}
	
	/**
	 * Equals-Method for <b>logitude</b>  <br>
	 * Type: float <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsLogitude(Float Logitude) {
		boolean result = false;
				if (getLogitude () != null
			&& getLogitude ().equals( Logitude )) {
			result = true;
		}
				return result;
	} 
	/**
	 * Setter for <b>latitude</b>  <br>
	 * Type: float <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public void setLatitude(Float Latitude) {
				if (!(Latitude == null && this.Latitude == null) && !this.changedFieldList.contains("latitude")) {
			this.changedFieldList.add("latitude");
		}
		this.Latitude = Latitude ;
			}
	
	/**
	 * Getter for <b>latitude</b>  <br>
	 * Type: float <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public Float getLatitude () {
		return this.Latitude;
	}
	
	/**
	 * Equals-Method for <b>latitude</b>  <br>
	 * Type: float <br>
	 * Length: -1 <br>
	 * Nullable: false <br>
	 * Comment: - <br>
	 */
	public boolean equalsLatitude(Float Latitude) {
		boolean result = false;
				if (getLatitude () != null
			&& getLatitude ().equals( Latitude )) {
			result = true;
		}
				return result;
	} 

	/**
	 * Returns a short String with the values.
	 */
	public String toInfoShortString() {
		return  "[ID=" + this.Id+"]" +"-[plz="+this.Plz + "]" +"-[ort="+this.Ort + "]" +"-[strasse="+this.Strasse + "]" +"-[hausnummer="+this.Hausnummer + "]" +"-[logitude="+this.Logitude + "]" +"-[latitude="+this.Latitude + "]" ;
	}
	
	/**
	 * Returns a Comma-Separated Values (CSV) String. <br>
	 * Separator: ;
	 */
	public String toCsvString() {
		return toCsvString(";");
	}
	
	/**
	 * Returns a Comma-Separated Values (CSV) String
	 * with the given separator.
	 */
	public String toCsvString(String separator) {
		return  this.Id+separator+this.Plz+separator+this.Ort+separator+this.Strasse+separator+this.Hausnummer+separator+this.Logitude+separator+this.Latitude;
	}
	
	/**
	 * Indicates whether the object has 
	 * changed or not.
	 */
	public boolean hasChanged() {
		return this.changedFieldList.size() > 0;
	}
	
	/**
	 * Changes Fields.
	 */
	public ArrayList<String> getChangedFieldList() {
		return this.changedFieldList;
	}
	
	/**
	 * Indicates, whether the object is new 
	 * or exists in the database.
	 */ 
	public boolean isNew() {
		return !loadFromDb;
	}
	
	/**
	 * Returns the name of the corresponding database table.
	 */
	public String getTable() {
		return TABLE;
	}
	
	/**
	 * Returns the name of the corresponding database schema.
	 */
	public String getSchema() {
		return SCHEMA;
	}
}